// Package main provides ...
package main

import "fmt"

func main() {
	arr := [10]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}

	s := arr[2:5]

	fmt.Println("s=", s)            //s= [3 4 5]
	fmt.Println("s.len()=", len(s)) //s.len()= 3
	fmt.Println("s.cap()=", cap(s)) //s.cap()= 8

	s2 := s[2:7]
	fmt.Println("s2=", s2)            //s2= [5 6 7 8 9]
	fmt.Println("s2.len()=", len(s2)) //s2.len()= 5
	fmt.Println("s2.cap()=", cap(s2)) //s2.cap()= 6
}
